#include <stdio.h>
#include <stdlib.h>

#include "IRC_core.h"

void usage( char *app ) 
{
	printf("Usage: %s <server> <port>\n", app);
}

int main( int argc, char *argv[] )
{
	struct IRC_core *IRC_core;

	if ( argc > 2 ) {
		IRC_core = new_IRC_core( argv[1], argv[2] );
		if ( IRC_core == NULL )
			return EXIT_FAILURE;
	}
	else {
		usage(argv[0]);
		return EXIT_FAILURE;
	}

	return IRC_core->exec();
}
